<include file="Public:basehead"/>
<div class="content">
	<div class="cLineB">
		<h4 class="left">关注者列表</h4>
		<div class="clr"></div>
	</div>
	<div class="cLine">
		<div class="pageNavigator left">以下是所有关注您的微信用户</div>
		<div class="clr"></div>
		
	</div>

	<div class="msgWrap">
		<form method="get" role="form" action="{cms>:U('SubscribeMember/index')}">
			<label for="typeid">类别（二维码）：</label>
			<select name='typeid' class="px" style="width: 100px;height: 30px">
				<option value="0">全部</option>
				<volist name="sqrtype" id="t">
				<option value="{cms>$t['id']}">{cms>$t['name']}</option>
				</volist>
			</select>
			&nbsp;&nbsp;&nbsp;&nbsp;
			<label for="city">城市：</label>
			<select name='city' class="px" style="width: 100px;height: 30px">
				<option value="0">全部</option>
				<volist name="citys" id="c">
				<option value="{cms>$c['city']}">{cms>$c['city']}</option>
				</volist>
			</select>
			
			<button class="btnGreen" type="submit">筛选</button>
		</form>
	
		<TABLE class="ListProduct" border="0" cellSpacing="0" cellPadding="0" width="100%">
			<THEAD>
				<TR>

					<TH class="keywords">头像</TH>
					<TH class="keywords">昵称</TH>
					<TH class="category">性别</TH>
					<TH class="keywords">城市</TH>
					<TH class="keywords">类别（二维码）</TH>
					<TH class="keywords">关注时间</TH>
					<TH class="keywords">操作</TH>
				</TR>
			</THEAD>
			<TBODY>
				<TR></TR>
				<volist name="subscribers" id="subscriber">
				<tr>
					<td><img src="{cms>$subscriber.headimgurl}" alt="无头像" width="80px"/> </td>
					<td>{cms>$subscriber.nickname}</td>
					<td><if condition="$subscriber.sex eq 1">男 <elseif
							condition="$subscriber.sex eq 2" />女 <else />未知 </if></td>
					<td>{cms>$subscriber.city}</td>
					<td>{cms>$qtype[$subscriber['qrtype']]}</td>
					<td><php>echo date('Y-m-d',$subscriber['addtime']);</php></td>
					<td><a href="{cms>:U('Messager/customer',array('id'=>$subscriber['id']))}">发送消息</a></td>
				</tr>
				</volist>

			</TBODY>
		</TABLE>
		
	</div>

	<div class="cLine">
		<div class="pageNavigator right">
			<div class="pages">{cms>$page}</div>
		</div>
		<div class="clr"></div>
	</div>

	<script type="text/javascript">
	function updateSubscriber(){
		if(confirm("更新数据需要花费大量时间，通常情况下数据都是最新的，你确定要个更新？")){
			showStop();
			window.location = "{cms>:U('SubscribeMember/update')}";
		}else{
			return false;
		}
	}
	
	function showStop(){
		var shadeDiv = $("#shadeDiv");
		if(shadeDiv.height()){
			shadeDiv.show();
		}else{
			shadeDiv = $("<div id='shadeDiv' style='width:100%;position:fixed;top:0;left:0;z-index:999;background:url({cms>:STATICS}/kindeditor/themes/common/loading.gif) no-repeat 50% 50%;background-color: rgba(77,77,77,0.4);filter:Alpha(opacity=40);'></div>");
			var wheight = $(window).height();
			shadeDiv.css('height',wheight+'px');
			$("body").append(shadeDiv);
		}
	}
	</script>

	<input type="button" value="全部更新"  class="btnGreen left"  onclick="updateSubscriber();"/>
	<div style="padding:10px 0 0 100px;">或者你可以<a href="https://mp.weixin.qq.com/" target="_blank" style="color:#00f;">点击这里</a>去微信官方后台查看更多具体信息</div> 
</div>
<div class="clr"></div>
<include file="Public:footer"/>